#import <UIKit/UIKit.h>

@protocol ShoppingCartViewDelegate<NSObject>
/**用于更新底部总金额，添加移除购物车之后要，从新计算总价。并通过代理的方式通知控制器
 让控制器告知 ShopCartBottomView 更新总金额*/
- (void)shoppingCartViewUpdateTotalPrice:(CGFloat)totalPrice;
/**购物车被清空通知控制器移除购物车页面*/
- (void)shoppingCartHaveBeClean;

@end

@interface ShoppingCartView : UIView
// 添加
- (void)addShoppingCartView:(UIViewController *)vc;
//删除
- (void)removeSubView:(UIViewController *)vc;




/**代理*/
@property (nonatomic, weak) id<ShoppingCartViewDelegate>delegate;
//11-20新加接口
@end

//以前的:服务器返回数据说明
/**
 {"event":"SUCCESS","data":[{"quantity":1,"goods":{"original_price":69.00,"thumbnail":"public/55487a34e6144fad9f278ea9d4396497","discount_price":69.00,"setMeal":[],"discount":1,"id":13,"title":"塔可小龙虾卷双人餐"},"id":670},{"quantity":2,"goods":{"original_price":23.00,"thumbnail":"public/a8d365eb1f50432cbf2d3497869a44a3","discount_price":23.00,"setMeal":[],"discount":0,"id":16,"title":"十三鲜小龙虾鸡肉卷"},"id":782}],"describe":""}
 */

//11-19 最新数据

/**
 {"event":"SUCCESS","data":[{"quantity":1,"goods":{"originalPrice":0.00,"ingredientClassify":[{"name":"No","ingredientList":[{"originalPrice":0.00,"name":"Cherry tomato","currentPrice":0.00,"id":41},{"originalPrice":0.00,"name":"Carrots","currentPrice":0.00,"id":39},{"originalPrice":0.00,"name":"Onion","currentPrice":0.00,"id":38},{"originalPrice":0.00,"name":"Sugar snap beans","currentPrice":0.00,"id":43},{"originalPrice":0.00,"name":"Mixed peppers","currentPrice":0.00,"id":42}],"id":6},{"name":"Main","ingredientList":[{"originalPrice":9.00,"name":"Chicken","currentPrice":9.00,"id":49}],"id":8}],"currentPrice":0.00,"id":66,"title":"yaki soba"},"remark":"","id":156},{"quantity":1,"goods":{"originalPrice":0.00,"ingredientClassify":[{"name":"No","ingredientList":[{"originalPrice":0.00,"name":"Carrots","currentPrice":0.00,"id":39},{"originalPrice":0.00,"name":"Onion","currentPrice":0.00,"id":38},{"originalPrice":0.00,"name":"Sugar snap beans","currentPrice":0.00,"id":43},{"originalPrice":0.00,"name":"Mixed peppers","currentPrice":0.00,"id":42},{"originalPrice":0.00,"name":"Cherry tomato","currentPrice":0.00,"id":41},{"originalPrice":0.00,"name":"Pineapples","currentPrice":0.00,"id":40}],"id":6},{"name":"Main","ingredientList":[{"originalPrice":10.00,"name":"House special","currentPrice":10.00,"id":51}],"id":8}],"currentPrice":0.00,"id":67,"title":"pad thai fried rice"},"remark":"","id":155}],"describe":""}
 */

